<script language="javascript" src="<?php echo base_url(); ?>application/views/pedido/funcAux.js"></script>
<form id="pedidoForm" onSubmit="return validadTotal()" class="form-horizontal well"  method="post" action="<?php echo base_url().'pedido/guardarPedido'?>" accept-charset="utf-8">
    <legend>Proforma y Pedido de Venta</legend>
    <fieldset>
         <div class="tabbable"> <!-- Only required for left/right tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tab1" data-toggle="tab">Datos Pedido</a></li>
                    <li><a href="#tab2" data-toggle="tab">Insumos de Pedido</a></li>
                    <li><a href="#tab3" data-toggle="tab">Tareas de Pedido</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tab1" >
                       <?php
                                $this->load->view('pedido/tabDatPed');
                         ?>
                    </div>
                    <div class="tab-pane" id="tab2">
                        <?php
                                $this->load->view('pedido/tabInsPed');
                         ?>
                    </div>
                    <div class="tab-pane" id="tab3">
                        <?php                                
                                $argumento=array('codi'=>$cod);
                                $this->load->view('pedido/tabTarPed',$argumento);
                         ?>
                    </div>
                </div>
            </div>
    </fieldset>   
    <fieldset class="well">
    <div class="row-fluid">
        <div class="span6 ">
            <div class="controls-group"> 
                <label class="control-label" for="obs">Porcentaje Util </label>  
                 <div class="controls">
                     <div class="input-prepend input-append">
                     <input class="span6" id="porUtil" size="16" type="text"><span class="add-on">%</span> </div>                                      
                </div>        
            </div>
            <div class="controls-group"> 
                <label class="control-label" for="subtotalGen">Costo</label>  
                <div class="controls">
                <div class="input-prepend input-append">
                <span class="add-on">S/.</span><input readonly="readonly" class="span6" id="subtotalGen" name="subtotalGen" size="16" type="text">
                </div> </div>        
             </div> 
            <div class="controls-group"> 
                <label class="control-label" for="igv"> Total IGV</label>  
                <div class="controls">
                <div class="input-prepend input-append">
                <span class="add-on">S/.</span><input readonly="readonly" class="span6" id="igv" name="igv" size="16" type="text">
                </div>   </div>      
         </div>
            <div class="controls-group"> 
                <label class="control-label" for="util">Utilidad</label>  
                <div class="controls">
                <div class="input-prepend input-append">
                <span class="add-on">S/.</span><input readonly="readonly" class="span6" id="util" name="util" size="16" type="text">
                </div>  </div>      
         </div>
        </div>
        <div class="span6 ">
            <div class="controls-group"> 
                <label class="control-label" for="obs">I.G.V </label>  
                <div class="controls">
                <div class="input-prepend input-append">
                    <input class="span6" id="igvpo" size="16" type="text"><span class="add-on">%</span>                                       
                </div> </div>       
            </div>
            <div class="controls-group"> 
                <label class="control-label" for="total"><STRONG>TOTAL</STRONG></label>  
                <div class="controls">
                <div class="input-prepend input-append">
                <span class="add-on">S/.</span><input readonly="readonly" class="span6" id="total" name="total" size="16" type="text">
                </div> </div>        
         </div>
             <div class="controls-group"> 
                <label class="control-label" for="subtotalGeneral"><STRONG>Adelanto</STRONG></label>  
                <div class="controls">
                <div class="input-prepend input-append">
                <span class="add-on">S/.</span><input class="span6" id="adel" name="adel" size="16" type="text">
                </div>  </div>       
         </div>
        </div>
    </div> 
        
  </fieldset>       
   <div class="row-fluid">
            <div class="span6 offset6">
            <div class="control-group">                    
                <div class="controls"> 
                    <button class="btn btn-success" type="button" onclick="calcular()">Calcular</button>
                    <button class="btn btn-danger" type="submit">Guardar</button>
                    <button class="btn btn-warning" type="button">Imprimir</button>
                </div>
            </div>
            </div>
        </div>     
    
  <div id="itemsOcultos" name="itemsOcultos"> </div>
  <div id="insumOcultos" name="insumOcultos"> </div>
  <div id="fasesOcultas" name="fasesOcultas"> </div>
</form>

<?php $this->load->view('pedido/buscaCliente')?>